package com.facade;

public class GeneralAwitchFacade {
	private light lights[]=new light[4];
	private fan fan;
	private airconditioner air;
	private Television tv;
	public GeneralAwitchFacade(){
		lights[0]=new light("上");
		lights[1]=new light("下");
		lights[2]=new light("左");
		lights[3]=new light("右");
		fan=new fan();
		air=new airconditioner();
		tv=new Television();
	}
	
	public void on(){
		lights[0].on();
		lights[1].on();
		lights[2].on();
		lights[3].on();
		fan.on();
		air.on();
		tv.on();
	}
	
	public void off(){
		lights[0].off();
		lights[1].off();
		lights[2].off();
		lights[3].off();
		fan.off();
		air.off();
		tv.off();
	}

}
